<template>
  <div v-if="info.bgImage" class="home-page-config">
    <infoCard :info="info"/>
  </div>
</template>

<script>
import { getModuleDetail } from '@/api/public'
import Cookies from 'js-cookie'
import { mapGetters } from 'vuex'
export default {
  name: 'HomePageConfig',
  data() {
    return {
      info: {}
    }
  },
  computed: {
    ...mapGetters(['baseApi'])
  },
  created() {
    this.getModuleInfo()
  },
  methods: {
    async getModuleInfo() {
      const id = Cookies.get('routerMenu') || undefined
      const res = await getModuleDetail({ id })
      this.info = res.data
    }
  }
}
</script>

<style scoped lang="scss">
.home-page-config{
  width: 90%;
  height: 360px;
  background-color: #fff;
  padding: 20px 20px;
  margin: 0 auto;
  margin-top: 30px;
}
</style>
